cmake_minimum_required(VERSION 2.6)

SET(CMAKE_CXX_FLAGS  "-g -pg -Wall")
SET(LINK_FLAGS "-pg -g")

SET(BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/wishmaster)
SET(SHAREDIR ${CMAKE_INSTALL_PREFIX}/share/wishmaster)

LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/libwm)
ADD_EXECUTABLE(wishmaster main.cpp)
TARGET_LINK_LIBRARIES(wishmaster ${QT_LIBRARIES} ${spelling_libs} wm)

INSTALL(TARGETS wishmaster RUNTIME DESTINATION ${BINDIR})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/chans.xml DESTINATION ${SHAREDIR})

